projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a2286b5
)
(file_name_as_directory): For an empty name, return "/".
author
Richard M. Stallman
<rms@gnu.org>
Tue, 27 Jan 1998 20:07:30 +0000
(20:07 +0000)
committer
Richard M. Stallman
<rms@gnu.org>
Tue, 27 Jan 1998 20:07:30 +0000
(20:07 +0000)
src/fileio.c
patch
|
blob
|
history
diff --git
a/src/fileio.c
b/src/fileio.c
index 49d7de52bbe8bc1729c7c6879edfe3bf22c85052..6993003a8f16c12845411964cbefe413d7fe01a0 100644
(file)
--- a/
src/fileio.c
+++ b/
src/fileio.c
@@
-484,11
+484,15
@@
file_name_as_directory (out, in)
{
int size = strlen (in) - 1;
- if (size < 0)
- error ("Empty file name");
-
strcpy (out, in);
+ if (size < 0)
+ {
+ out[0] = '/';
+ out[1] = 0;
+ return out;
+ }
+
#ifdef VMS
/* Is it already a directory string? */
if (in[size] == ':' || in[size] == ']' || in[size] == '>')